﻿using System.Collections.Generic;
using Azure.QPCR;

namespace Azure2Java.QPCRAdapter.Adapter.Entity {

    public class StatusBean {
        public StatusQueryReturnMessage StatusQueryReturnMessage;

        public StatusBean() {
            StatusQueryReturnMessage = new StatusQueryReturnMessage();
            StatusQueryReturnMessage.BlockTemp = new short[0];
            StatusQueryReturnMessage.CtrlMode = 0;
            StatusQueryReturnMessage.CurrCycle = 0;
            StatusQueryReturnMessage.CurrStep = 0;
            StatusQueryReturnMessage.CurrTimeRemain = 0;
            StatusQueryReturnMessage.EnvTemp = 0;
            StatusQueryReturnMessage.FileName = new byte[0];
            StatusQueryReturnMessage.HotLidMode = 0;
            StatusQueryReturnMessage.HotLidTemp = 0;
            StatusQueryReturnMessage.IsFinished = 0;
            StatusQueryReturnMessage.ProgTimeRemain = 0;
            StatusQueryReturnMessage.ProgTimeStart = 0;
            StatusQueryReturnMessage.RadiatorTemp = 0;
            StatusQueryReturnMessage.RunID = new uint[0];
            StatusQueryReturnMessage.SampleID = new uint[0];
            StatusQueryReturnMessage.SampleTemp = new short[0];
            StatusQueryReturnMessage.Volume = 0;
            StatusQueryReturnMessage.WorkStatus = 0;
        }

        public StatusBean(StatusQueryReturnMessage StatusQueryReturnMessage) {
            this.StatusQueryReturnMessage = StatusQueryReturnMessage;
        }

        public ushort getCurrentCycle() { return StatusQueryReturnMessage.CurrCycle; }

        public ushort getCurrentStep() { return StatusQueryReturnMessage.CurrStep; }

        public uint getCurrentTimeRemain() { return StatusQueryReturnMessage.CurrTimeRemain; }

        public short[] getBlockTemperature() { return StatusQueryReturnMessage.BlockTemp; }

        public ushort getCtrlMode() { return StatusQueryReturnMessage.CtrlMode; }

        public short[] getSampleTemperature() { return StatusQueryReturnMessage.SampleTemp; }

        public short getEnvTemperature() { return StatusQueryReturnMessage.EnvTemp; }

        public byte[] getFileName() { return StatusQueryReturnMessage.FileName; }

        public ushort getHotLidMode() { return StatusQueryReturnMessage.HotLidMode; }

        public short getHotLidTemperature() { return StatusQueryReturnMessage.HotLidTemp; }

        public ushort isFinished() { return StatusQueryReturnMessage.IsFinished; }

        public uint getProgramTimeRemain() { return StatusQueryReturnMessage.ProgTimeRemain; }

        public uint getProgramTimeStart() { return StatusQueryReturnMessage.ProgTimeStart; }

        public short getRadiatorTemperature() { return StatusQueryReturnMessage.RadiatorTemp; }

        public ushort getVolume() { return StatusQueryReturnMessage.Volume; }

        public ushort getWorkStatus() { return StatusQueryReturnMessage.WorkStatus; }

        public int[] getRunId() {
            List<int> result = new List<int>();
            foreach(var item in StatusQueryReturnMessage.RunID) {
                result.Add((int) item);
            }
            return result.ToArray();
        }

        public int[] getSampleId() {
            List<int> result = new List<int>();
            foreach(var item in StatusQueryReturnMessage.SampleID) {
                result.Add((int) item);
            }
            return result.ToArray();
        }

    }
}
